home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / utility / modepro / installmodepro next >
Text File  |  1996-11-10  |  9KB  |  261 lines

  1. ; Install script for ModePro
  2.  
  3.  
  4. ( set ModePro "ModePro")
  5. ( set ModeProPrefs "ModeProPrefs")
  6.  
  7. ;-------------------------------------------------------------
  8. ( set Yes "Yes")
  9. ( set No  "No")
  10.  
  11. ;-------------------------------------------------------------
  12. ( set Def_DaemonPath_WB      ( expandpath "Sys:WBStartup/" ) )
  13. ( set Def_DaemonPath_COM     ( expandpath "Sys:Tools/Commodities/" ) )
  14. ( set Def_PrefsPath          ( expandpath "Sys:Prefs/" ) )
  15.  
  16. ;-------------------------------------------------------------
  17. ( set AskAutoRunMP      "Automatically run ModePro when the computer boots?" )
  18. ( set AskAutoRunMPHelp  "HHHEEELLLPPPP!!!!" )
  19.  
  20.  
  21. ;-------------------------------------------------------------
  22. ( set AskStartHow               "How would you like ModePro started?\nPress 'Help' for more info.")
  23. ( set OptStartWBStartup         "Put ModePro in the WBStartup drawer")
  24. ( set OptStartUserStartup       "Start ModePro in the Startup-Sequence")
  25. ( set AskStartHowHelp           "ModePro can be started automatically on bootup two ways.  The simplest method is by placing ModePro in the WBStartup drawer.  The second way is to run ModePro from the s:User-Startup file, doing so allows ModePro to promote the Workbench screen." )
  26.  
  27. ;-------------------------------------------------------------
  28. ( set AskPrefsPath      "ModeProPrefs allows you to edit ModePro's promotion options.  Where would you like to put the preferences editor?" )
  29. ( set AskPrefsPathHelp  ("Generally this should be in the %s drawer." Def_PrefsPath) )
  30. ( set AskDaemonPath     "This is the suggested path for ModePro.  Change it if you wish." ) 
  31.  
  32. ;-------------------------------------------------------------
  33. ( set ToolTypeOptions  "Various options" )
  34.  
  35. ( set AskCxPopKey    "Enter the hotkey that pops up the preferences interface." )
  36.  
  37. ( set AskCxPri       "Enter the value of ModePro's commodity priority." )  
  38.  
  39. ( set AskCxPopup     "Would you like ModePro to popup the interface each time it is started.")
  40.  
  41. ( set AskCatOpts     "How should ModePro react when an unknown screen is opened?" )
  42. ( set OptCatProg     "Add the program name to the list." )
  43. ( set OptCatScr      "Add the screen name to the list." )
  44.  
  45. ( set AskCatPopup    "Should ModePro open the interface when a new screen is added to the list?" )
  46.  
  47. ( set AskNLM         "The New Look Menu patch forces some programs to use the AmigaDOS 3+ menu style(usaully black letters on a white background).  Enable the New Look Menu patch?")
  48. ;
  49. ( set AskLanguages   "ModePro features a localized interface.  Which languages would you like to install")
  50. ( set AskCenterAll   "Should all screens be centered?" )
  51. ( set OptCenterAllNope   "No")
  52. ( set OptCenterAllHoriz "Horizontally")
  53. ( set OptCenterAllVert  "Vertically")
  54. ( set OptCenterAllBoth  "Both Directions")
  55.  
  56.  
  57. ;-----------------------------------------------------------------------
  58. ( set IM        "Installing ModePro...")
  59.  
  60. ( set AskLang   "Which languages would you like installed with ModePro?")
  61. ( set OptLangFrancais  "français" )
  62. ( set OptLangIslenska  "íslenska" )
  63. ( set OptLangPolski    "polski"   )
  64.  
  65. ( set SrcCatPath "catalogs/%s" )
  66. ( set DestCatPath "locale:catalogs/%s" )
  67.  
  68. ;-----------------------------------------------------------------------
  69. ( set AskModifyUS    "The options you have chosen require the s:user-startup file to be modified." )
  70.  
  71.  
  72.  
  73.  
  74. ( set AutoRun ( askbool (prompt  AskAutoRunMP ) 
  75.                         (help    AskAutoRunMPHelp ) 
  76.                         (default 0) 
  77.               )  
  78. )
  79.  
  80. ( if AutoRun 
  81.     (
  82.         ( set AutoHow ( askchoice (prompt   AskStartHow)
  83.                                   (help     AskStartHowHelp)
  84.                                   (choices  OptStartWBStartup OptStartUserStartup)
  85.                                   (default  1)
  86.                        )
  87.         )
  88.         ( if AutoHow
  89.             (
  90.                 (set daemonpath Def_DaemonPath_COM)
  91.             )
  92.             (
  93.                 (set daemonpath Def_DaemonPath_WB)
  94.             )
  95.         )   
  96.     )
  97.     (
  98.         (set daemonpath Def_DaemonPath_COM)
  99.     )
  100. )
  101.  
  102. (set daemonpath ( askdir (prompt AskDaemonPath)
  103.                           (help "Cow")
  104.                           (default daemonpath)
  105. ) )
  106.  
  107. (set prefspath ( askdir (prompt  AskPrefsPath)
  108.                                (help    AskPrefsPathHelp)
  109.                                (default Def_PrefsPath)
  110.                       ) 
  111. )
  112.  
  113. ( set ModeProPrefsCommand ( tackon ( prefspath) 
  114.                                    ( "ModeProPrefs") 
  115.                           ) 
  116. )
  117.  
  118. ( set cxpopkey ( askstring  (prompt AskCxPopKey)
  119.                             (help "None")
  120.                             (default "lcommand p")
  121.                )
  122. )
  123.  
  124. ( set cxpri ("%ld" (asknumber  (prompt AskCxPri)
  125.                                (help "None")
  126.                                (default 5)
  127.                    )
  128.             )
  129. )
  130.  
  131. ( set cxpopup  ( askbool (prompt  AskCxPopup)
  132.                          (help    "None" )
  133.                ) 
  134. )
  135.  
  136. ( set coptions  (askoptions (prompt AskCatOpts)
  137.                             (help "None")
  138.                             (choices OptCatProg OptCatScr)
  139.                             (default 0)
  140.                 )
  141. )
  142.  
  143. ( set catchprog (BITAND coptions 1) )
  144.  
  145. ( set catchscr  (BITAND (shiftright coptions 1) 1) )
  146.  
  147.  
  148. (if coptions
  149.     (
  150.         ( set catchpopup ( askbool (prompt AskCatPopup)
  151.                                    (help "None")
  152.                           ) 
  153.         )
  154.     )
  155.     (
  156.         (set catchpopup 0)          
  157.     )
  158. )
  159.  
  160. ( set newlookmenus ( askbool (prompt  AskNLM)
  161.                            (help    "None" )
  162.                    )
  163. )
  164.  
  165. ( set CenterAll ( askchoice (prompt   AskCenterAll)
  166.                             (help     "No")
  167.                             (choices  OptCenterAllNope OptCenterAllHoriz OptCenterAllVert OptCenterAllBoth)
  168.                             (default  0)
  169.                 )
  170. )
  171.  
  172.  
  173. ;-Set the tooltypes----------------------------------------------------
  174.  
  175. (tooltype (dest ModePro)
  176.           (settooltype "CX_POPKEY" cxpopkey)
  177.           (settooltype "CX_POPUP" (select cxpopup No Yes) )
  178.           (settooltype "CX_PRIORITY" cxpri )
  179.           (settooltype "NEWLOOKMENUS" (select newlookmenus No Yes) )
  180.           (settooltype "CATCH_NEWPROGRAMS" (select catchprog No Yes) )
  181.           (settooltype "CATCH_NEWSCREENS" (select catchscr No Yes) )
  182.           (settooltype "CATCH_POPUP" (select catchpopup No Yes) )
  183.           (settooltype "PREFSCOMMAND" ModeProPrefsCommand)
  184.           (settooltype "CENTERALLHORIZ" (select CenterAll No Yes No Yes) )
  185.           (settooltype "CENTERALLVERT" (select CenterAll No No Yes Yes) )
  186. )
  187.  
  188.  
  189.  
  190. ;--------------------------------------------------------------
  191.  
  192. (copyfiles (prompt IM)
  193.            (help "Why did you do that?")
  194.            (source ModePro)
  195.            (infos)
  196.            (dest daemonpath)
  197. )
  198.  
  199. (set @default-dest daemonpath)
  200.  
  201. (copyfiles (prompt IM)
  202.            (help "Hey, what are you doing?")
  203.            (source ModeProPrefs)
  204.            (infos)
  205.            (dest prefspath)
  206. )
  207.  
  208. (if (AND AutoRun AutoHow)
  209.     ( 
  210.         (startup "ModePro"
  211.                  (prompt  AskModifyUS )
  212.                  (help    "No help here." )
  213.                  (command (cat "Run <>NIL: ModePro"
  214.                                " CX_PRIORITY="  cxpri 
  215.                                " CX_POPKEY=\""  cxpopkey "\""
  216.                                " CX_POPUP="     (select cxpopup No Yes)
  217.                                (select newlookmenus     ""  " NLM"  )
  218.                                (select catchprog        ""  " CPROG")
  219.                                (select catchscr         ""  " CSCR" )
  220.                                (select catchpopup       ""  " CPOP" )
  221.                                " PCMD=\""       ModeProPrefsCommand "\"" 
  222.                           )
  223.                  )
  224.         )
  225.     )
  226.     (
  227.        (startup "ModePro"
  228.                  (prompt  AskModifyUS )
  229.                  (help    "No help here." )
  230.                  (command ";Don't run ModePro from User-Startup")
  231.   
  232.         )
  233.     )
  234. )
  235.  
  236. (set WhichLang (askoptions (prompt AskLang)
  237.                            (help "Nope!")
  238.                            (choices OptLangFrancais OptLangIslenska OptLangPolski)
  239.                            (default 0) 
  240. )              )
  241.  
  242. (set optnumber 0)
  243.  
  244. ( while ( < optnumber 3 )
  245.   (set flag (BITAND (shiftright WhichLang optnumber) 1) )
  246.   (debug optnumber flag)
  247.   (if flag
  248.     (
  249.       (set lang     ( select optnumber OptLangFrancais OptLangIslenska OptLangPolski ) )
  250.       (debug lang)
  251.       (set srcpath ( SrcCatPath  lang ) )
  252.       (debug srcpath)
  253.       (set dstpath ( DestCatPath lang ) )
  254.       (debug dstpath) 
  255.       (makedir dstpath)
  256.       (copyfiles  (prompt IM) (help "Why did you do that?") (source srcpath) (dest dstpath) (all) )
  257.     )
  258.   )
  259.   (set optnumber (+ optnumber 1) )
  260. )
  261.